package com.matol.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.matol.entity.User;
import com.matol.mapper.UserMapper;
import com.matol.service.UserService;
 
/** 
 *  
 * @author matol 
 * @date 2013-01-23 16:38
 */  
@Service
@Transactional
@Repository(value = "userServiceImpl")
public class UserServiceImpl implements UserService{
	@Autowired
	private UserMapper userMapper;

	public Integer count() {
		return userMapper.count();
	}
	
	public Integer create(User user) {
		return userMapper.create(user);
	}
	
	public Integer delete(Integer id) {
		return userMapper.delete(id);
	}

	public List<User> findAll() {
		return userMapper.findAll();
	}

	public List<User> findAll(User user) {
		return userMapper.findAll(user);
	}

	public User findById(Integer id) {
		return userMapper.findById(id);
	}

	public User findByUser(User user) {
		return userMapper.findByUser(user);
	}
	
	public Integer modify(User user) {
		return userMapper.modify(user);
	}
	
}
